As a technique for efficiently encoding an image, a JPEG compression technique and encoding methods such as MPEG1 and MPEG2 using the motion prediction-motion compensation technique have been established. Manufacturers are developing and manufacturing image capturing apparatuses such as digital cameras and digital video cameras and DVD recorders capable of recording images on recording media by using these encoding methods.
A digital moving image has an enormous data amount. To compress this enormous data amount, the compression ratio must be increased by performing coarse quantization when encoding each block. However, a quantization error occurring when the coarse quantization is performed produces a pixel value level difference in the block boundary. When the user watches the image, the image quality deteriorates because he or she perceives this pixel value level difference (to be referred to as block noise hereinafter). In H.264 as an encoding method, a noise reduction filter called a deblocking filter has been standardized in order to reduce this block noise. H.264 has been standardized by the ITU-T (International Telecommunication Union Telecommunication Standardization Sector) and the ISO (International Organization for Standardization), and is formally called H.264/MPEG-4 part 10.
This deblocking filter processing is performed on a decoded image. When performing local decoding during encoding in order to perform motion compensation, the deblocking filter processing can be performed on this locally decoded image. The filter intensity of this deblocking filter changes pixel by pixel based on a quantization parameter or the like, in conformity with the method standardized by H.264. A mechanism that changes the filter intensity for each region (slice) larger than a pixel has also been standardized. In conformity with this mechanism, the filter intensity of the deblocking filter can be controlled during encoding. The locally decoded image having undergone the deblocking filter processing is an image to be referred to when performing motion compensation on the next frame in the encoding order. Therefore, the encoding efficiency can be increased by reducing the block noise.
A technique as described in Japanese Patent Laid-Open No. 2008-11324 has been disclosed as a technique of controlling the filter intensity in the filter processing during encoding. Patent literature 1 has disclosed a technique of changing the intensity of a bandlimiting filter with respect to an original image, in accordance with the PSNR of an unencoded original image and a predicted image generated by motion compensation during encoding.